package com.hevs.samplewebapp.server.dao;

import javax.jdo.JDOHelper;
import javax.jdo.PersistenceManagerFactory;

/**
 * Persistent Manager Factory
 *  
 * @author Arnaud Durand
 * @date 23.04.2012
 */
public final class PMF {
	/**
	 * Initialization of the persistence Manager factory to use JDO and the JDOconfig.xml
	 */
    private static final PersistenceManagerFactory pmfInstance =
        JDOHelper.getPersistenceManagerFactory("transactions-optional");

    /**
     * Constructor of the PMF
     */
    private PMF() {}

    /**
     * Getter for the Persistence manager factory
     * @return
     * an instance of the persistence manager factory
     */
    public static PersistenceManagerFactory get() {
        return pmfInstance;
    }
}